package com.fay.designPattern.oop.basic;

/**
 * @Title:
 * @Description:
 * @Author Fay Wang
 * @Date 2022/2/21 21:35
 * @Version 1.0
 */
public class Ostrich1 implements Tweetable, Eggable {
    private TweetAbility tweetAbility = new TweetAbility();
    private EggLayable eggLayable = new EggLayable();

    @Override
    public void layEgg() {
        eggLayable.layEgg();//委托
    }

    @Override
    public void tweet() {
        tweetAbility.tweet();//委托
    }
}
